#ifndef IRVIDEOWIDGET_H
#define IRVIDEOWIDGET_H

#include <QObject>
#include <QWidget>
#include <QMutex>
#pragma execution_character_set("utf-8")
class IrVideoWidget : public QWidget
{
    Q_OBJECT
public:
    explicit IrVideoWidget(QWidget *parent = nullptr);

    void setFrame(const QImage& frame);
    void setIrData(const QVector<quint16>& irData, int width, int height);
signals:

protected:
    void paintEvent(QPaintEvent* event) override;
    void mouseMoveEvent(QMouseEvent* event) override;
    void leaveEvent(QEvent* event) override;


private:
    QMutex m_mutex;
    QPixmap m_currentFrame;
    QVector<quint16> m_irData;
    int m_irWidth = 0;
    int m_irHeight = 0;
    QPoint m_lastPos;
};

#endif // IRVIDEOWIDGET_H
